<template>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"  :title="'网络图片'" :visible="visible" width="600px" :append-to-body="true" :closable="false" :mask-closable="false">
        <el-form label-width="100px">
            <el-form-item label="网络图片">
                <el-input type="textarea" v-model="urlSrc" :row="20" placeholder="网络图片,多图片用换行隔开，目前支持单图"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer">
            <el-button @click="cancel">关闭</el-button>
            <el-button @click="ok" :loading="loading">确定</el-button>
        </div>
    </el-dialog>
</template>
<script>
import api from "@/api/api"
import Constants from "@/utils/constants"
export default {
    name: 'CErpImage',
    data() {
        return {
            urlSrc: "",
            visible: false,
            loading: false,
            type:0
        }
    },
    mounted: function() {


    },
    create: function() {

    },
    methods: {
        showDialog(type) {
            this.type=1;
            this.visible = true;
        },
        cancel() {
            this.visible = false;
        },
        ok() {
            if (!this.urlSrc) {
                this.visible = false;
            } else {
                //处理远程图片
                this.loading=false;
 				this.visible = false;
 				this.$emit("ok", this.urlSrc);


            }
        }
    }
}
</script>
<style>
</style>